#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.web.health;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 *
 * @author leon
 * @version ${symbol_dollar}Id: DemoController.java, v 0.1 2017年3月3日 下午5:15:34 leon Exp ${symbol_dollar}
 */
@RestController
public class DemoController {

    private static final Logger logger = LoggerFactory.getLogger(DemoController.class);

//    @Value("${symbol_dollar}{app.project.version}")
    private String appProjectVersion;

    @RequestMapping(value = "/demo_rest", method = RequestMethod.GET, produces = "${artifactId}/json; charset=UTF-8")
    @ResponseBody
    public HashMap<String, String> demoRest() {
        HashMap<String, String> ret = new HashMap<>();
        String msg = "Hello! This is " + "Itemcenter Application.";
        ret.put("msg", msg);
        return ret;
    }

    @RequestMapping(value = "/demo_html", method = RequestMethod.GET)
    public String demoHtml(ModelMap map) {
        map.addAttribute("helloMsg", "Hello, This is Local DEMO.");
        return "demo";
    }

    @RequestMapping(value = "/", method = RequestMethod.GET, produces = "${artifactId}/json; charset=UTF-8")
    public HashMap<String, String> testRest() {
        HashMap<String, String> ret = new HashMap<>();
        String msg = "Hello! This is " + "Usercenter Application.";
        ret.put("msg", msg);
        return ret;
    }

}
